<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/commons/global.jsp" %>
<script type="text/javascript">
    $(function() {
        $('#drivingLicenceEditForm').form({
            url : '${path}/drivingLicence/edit',
            onSubmit : function() {
                progressLoad();
                var isValid = $(this).form('validate');
                if (!isValid) {
                    progressClose();
                }
                return isValid;
            },
            success : function(result) {
                progressClose();
                result = $.parseJSON(result);
                if (result.success) {
                    parent.$.modalDialog.openner_dataGrid.datagrid('reload');//之所以能在这里调用到parent.$.modalDialog.openner_dataGrid这个对象，是因为user.jsp页面预定义好了
                    parent.$.modalDialog.handler.dialog('close');
                } else {
                    parent.$.messager.alert('错误', result.msg, 'error');
                }
            }
        });

        $("#isRevoke").val('${drivingLicence.isRevoke}');
        $("#userNativePlace").combobox({
            url:'${path}/ecArea/search?level=1',
            method:'post',
            valueField:"areaId",
            textField:"areaName",
            panelHeight:"200",
            editable:false
        })
        $("#userNativePlace").combobox('setValue', ${drivingLicence.userNativePlace});

    });
</script>
<div class="easyui-layout" data-options="fit:true,border:false">
    <div data-options="region:'center',border:false" title="" style="overflow: hidden;padding: 3px;">
        <form id="drivingLicenceEditForm" method="post">
            <table class="grid">
                <tr>
                    <td>驾驶证所有人姓名</td>
                    <td>
                        <input name="id" value="${drivingLicence.id}" hidden>
                        <input name="licenceUsername" value="${drivingLicence.licenceUsername}" type="text" placeholder="请输入名称" class="easyui-validatebox span2" data-options="required:true" value=""></td>
                </tr>
                <tr>
                    <td>驾驶证所有人手机号</td>
                    <td><input name="licenceMobile" value="${drivingLicence.licenceMobile}" type="text" placeholder="请输入名称" class="easyui-validatebox span2" data-options="required:true" value=""></td>
                </tr>
                <tr>
                    <td>驾驶证所有人身份证号</td>
                    <td><input name="licenceCardid" value="${drivingLicence.licenceCardid}" type="text" placeholder="请输入名称" class="easyui-validatebox span2" data-options="required:true" value=""></td>
                </tr>
                <tr>
                    <td>驾驶证号码</td>
                    <td><input name="licenceNumber" value="${drivingLicence.licenceNumber}" type="text" placeholder="请输入名称" class="easyui-validatebox span2" data-options="required:true" value=""></td>
                </tr>
                <tr>
                    <td>驾驶证档案编号</td>
                    <td><input name="licenceFileNumber" value="${drivingLicence.licenceFileNumber}" type="text" placeholder="请输入名称" class="easyui-validatebox span2" data-options="required:true" value=""></td>
                </tr>
                <tr>
                    <td>驾驶证人籍贯</td>
                    <td>
                        <select id="userNativePlace" name="userNativePlace"
                                class="easyui-combobox"  data-options="width:140,height:29,editable:false,panelHeight:'auto'">
                            <option value="">请选择</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td>驾驶证人住址</td>
                    <td><input name="userAddress" value="${drivingLicence.userAddress}" type="text" placeholder="请输入名称" class="easyui-validatebox span2" data-options="required:true" value=""></td>
                </tr>
                <tr>
                    <td>是否吊销</td>
                    <td>
                        <select id="isRevoke" name="isRevoke" class="easyui-combobox" data-options="width:140,height:29,editable:false,panelHeight:'auto'">
                            <option value="Y">是</option>
                            <option value="N">否</option>
                        </select>
                    </td>
                </tr>
            </table>
        </form>
    </div>
</div>